package com.example.lastwork.dao;


import com.example.lastwork.common.dao.LogicDAO;
import com.example.lastwork.entity.Orders;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface OrdersDao extends LogicDAO<Orders, Long> {
    @Modifying
    @Query("UPDATE Orders o SET o.total = :total WHERE o.id = :ordersId")
    int updateTotalPrice(@Param(value = "ordersId") Long ordersId, @Param(value = "total") Double total);
}
